<?php
  define('CSS_JS_VERSION', '1.0.0 Beta');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="pl" />
    <title>RCP | Volkswagen Group Polska</title>
    <link rel='stylesheet' type='text/css' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/smoothness/jquery-ui.css' />
    <?php foreach ($this->cssFiles as $file): ?>
      <link href="<?php echo($file); ?>" rel="stylesheet" media="screen">
    <?php endforeach; ?>
    <link rel="Shortcut icon" href="/favicon.ico?ver=1.1" />
  </head>
  <body>
    <div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
      <div class="modal-dialog">
        <div class="modal-content"></div>
      </div>
    </div>
    <div class="rightMenu">
      <span class="changeLang" data-lang="pl">PL</span>
      <span class="changeLang" data-lang="en">EN</span>
    </div>
    <div id="mainContainer">
      <div id="page">
        <div id="pageContent" class="center">
          <div id="head">
            <a id="headL" href="/"><span class="project-logo"></span></a>
            <a id="headR" href="http://vw-group.pl/"><span class="project-logo"></span></a>
            <div id="clock" class="right">
              <i class="fa fa-clock-o"></i>
              <div id="clockContent"></div>
            </div>
          </div>
          <div id="container">
            <div id="headContainer" class="stickable">
              <nav class="navbar navbar-default" role="navigation">
                <div class="container-fluid">
                  <div class="navbar-header">
                    <a id="gotoHome" class="navbar-brand" href="/">RCP</a>
                  </div>
                  <div id="userContainer"></div>
                </div><!-- /.container-fluid -->
              </nav>
              <div id="subtitleNavBar" class="subnav" style="display:none;"></div>
            </div>
            <div id="bodyContainer"></div>
          </div>
        </div>
      </div>
      <div id="foot">
        <div id="footHolder" class="center">
          <a id="footercreated" onclick="javascript:this.target='_blank';" title="Created by Gmind Software House" href="http://www.gmind.pl"></a>
            <p>
              © Volkswagen Group Polska 2013 | 
              <a onclick="javascript:this.target='_blank'" href="http://vw-group.pl/">www.vw-group.pl</a>
            </p>
            <p style="display: block; text-align: right; width: 960px;">
              PP <?php echo CSS_JS_VERSION ?>
            </p>
        </div>
        <div class="clearfix"></div>
      </div>
    </div>

    <div id="preloader" style="display: none;">
      <img src="/images/preloader.gif" />
      <div class="preloader-background"></div>
    </div>

    <?php require('/modules/rcp/js/templates/menu.php'); ?>
    <?php require('/modules/rcp/js/templates/login.php'); ?>
    <?php require('/modules/rcp/js/templates/nav.php'); ?>
    <?php require('/modules/rcp/js/templates/topBarSubtitle.php'); ?>
    <?php require('/modules/rcp/js/templates/calendar.php'); ?>
    <?php require('/modules/rcp/js/templates/calendarEmployee.php'); ?>
    <?php require('/modules/rcp/js/templates/eventMenu.php'); ?>
    <?php require('/modules/rcp/js/templates/dialogMessage.php'); ?>
    <?php require('/modules/rcp/js/templates/dialogPersonalBusinessLeave.php'); ?>
    <?php require('/modules/rcp/js/templates/dialogTimesheet.php'); ?>
    <?php require('/modules/rcp/js/templates/dialogChoseNewEventType.php'); ?>
    <?php require('/modules/rcp/js/templates/dialogAutobilans.php'); ?>
    <?php require('/modules/rcp/js/templates/dialogOrderOvertime.php'); ?>
    <?php require('/modules/rcp/js/templates/applicationBase.php'); ?>
    <?php require('/modules/rcp/js/templates/applicationOvertime.php'); ?>
    <?php require('/modules/rcp/js/templates/applicationPersonalLeave.php'); ?>
    <?php require('/modules/rcp/js/templates/applicationPresent.php'); ?>
    <?php require('/modules/rcp/js/templates/applicationRecompenseExtraTime.php'); ?>
    <?php require('/modules/rcp/js/templates/applicationRecompenseExtraTimeRow.php'); ?>
    <?php require('/modules/rcp/js/templates/timesheetRow.php'); ?>
    <?php require('/modules/rcp/js/templates/timeSliderRange.php'); ?>
    <?php require('/modules/rcp/js/templates/foreignLanguageGroupList.php'); ?>
    <?php require('/modules/rcp/js/templates/foreignLanguagePresenceList.php'); ?>
    <?php require('/modules/rcp/js/templates/myApplications.php'); ?>
    <?php require('/modules/rcp/js/templates/myApplicationsRow.php'); ?>
    <?php require('/modules/rcp/js/templates/employeeApplications.php'); ?>
    <?php require('/modules/rcp/js/templates/employeeApplicationsRow.php'); ?>
    <?php require('/modules/rcp/js/templates/myOrders.php'); ?>
    <?php require('/modules/rcp/js/templates/myOrdersRow.php'); ?>
    <?php require('/modules/rcp/js/templates/employeeOrders.php'); ?>
    <?php require('/modules/rcp/js/templates/employeeOrdersRow.php'); ?>

    <?php foreach ($this->jsFiles as $file): ?>
      <script type="text/javascript" src="<?php echo($file); ?>"></script>
    <?php endforeach; ?>
    
    <script type="text/javascript">
      var IP = '<?php echo $_SERVER['REMOTE_ADDR']; ?>';
      var lang = '';
      var segments = window.location.pathname.split('/');
      var rootPath = '<?php echo $this->rootPath; ?>';
      segments.shift();
      if (rootPath != '')
          segments.shift();
      if (segments[0] != undefined) {
        var lang = segments[0];
      }
      if (lang != '') {
        if (LANGUAGES.indexOf(lang) == -1) {
          lang = DEFAULT_LANGUAGE;
        }
      } else {
        lang = DEFAULT_LANGUAGE;
      }
      var router = new APP.Routers.MainRouter({language: lang});
    </script>
  </body>
</html>
